﻿/**
 * 
 * @file FITKAcousticsHDF5Reader.h
 * @brief 声学hdf5工程文件写出
 * @author LiBaojun (libaojunqd@foxmail.com)
 * @date 2024-12-13
 * 
 */

#ifndef _FITKACOUSTICS_HDF5_READER_H___
#define _FITKACOUSTICS_HDF5_READER_H___

#include "FITK_Interface/FITKInterfaceIO/FITKAbstractHDF5Reader.h"
#include "FITK_Component/FITKAcousticsPhysics/FITKAcousticsAbsMaterial.h"


namespace Acoustics
{
    class FITKAcousticsDiscModel;
    class FITKAcousticsPhysics;
    class FITKAcousticsGeometryData;
    class FITKAcousticsPostData;
    class FITKAcousticsGroupManager;
}

namespace IO
{
    class FITKAcousticsHDF5IOInterface;
    /**
     * @brief 声学HDF5工程文件读取
     * @author LiBaojun (libaojunqd@foxmail.com)
     * @date 2024-12-13
     */
    class FITKAcousticsHDF5Reader : public IO::FITKAbstractHDF5Reader
    {
    public:
        /**
         * @brief Construct a new FITKVAOneXMLReader object
         * @param[i]  interface      组件指针，可传递参数
         * @param[o]  isSuccess      是否执行成功
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-10-11
         */
        explicit FITKAcousticsHDF5Reader(FITKAcousticsHDF5IOInterface* interface, bool & isSuccess);
        /**
         * @brief Destroy the FITKVAOneXMLReader object
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-10-11
         */
        virtual ~FITKAcousticsHDF5Reader();
        /**
         * @brief 执行读取操作
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-10-11
         */
        void run() override;

 
        /**
          * @brief 打印控制台消息
          * @param[i] level 打印级别 1 normal 2 warning 3error
          * @param[i] str 打印的信息
          * @author LiBaojun (libaojunqd@foxmail.com)
          * @date 2024-03-08
          */
        void consoleMessage(int level, const QString& str) override;

    private:
        /**
         * @brief 组件对象指针
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-10-11
         */
        FITKAcousticsHDF5IOInterface* _compInterface{};
        /**
         * @brief 是否执行成功
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-10-11
         */
        bool & _isSuccess;
        /**
          * @brief 声学离散模型，读取的信息存放在这里
          * @author LiBaojun (libaojunqd@foxmail.com)
          * @date 2024-10-11
          */
        Acoustics::FITKAcousticsDiscModel* _discModel{};
        /**
         * @brief 声学物理模型，读取的信息存放在这里
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-10-11
         */
        Acoustics::FITKAcousticsPhysics* _physics{};
        /**
         * @brief几何数据，读取的信息存放在这里
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2025-02-19
         */
        Acoustics::FITKAcousticsGeometryData *_geoData{};

        /**
         * @brief后处理数据
         * @author yangjing (1195810980@qq.com)
         * @date 2025-02-19
         */
        Acoustics::FITKAcousticsPostData *_postData{};


        /**
        * @brief 分组信息数据管理器
        * @author yangjing (1195810980@qq.com)
        * @date 2025-02-24
        */
        Acoustics::FITKAcousticsGroupManager *_groupData{};


    private:
        /**
        * @brief 检查HDF5工程文件
        * @author yangjing (1195810980@qq.com)
        * @date 2025-02-24
        */
        bool checkVersion();

    };
}


#endif
